package com.wangjiyuan.shiwupai.ui_food.food_class;

import com.wangjiyuan.shiwupai.bean.first_food.FoodBean;
import com.wangjiyuan.shiwupai.bean.first_food.FoodClassBean;
import com.wangjiyuan.shiwupai.bean.first_food.FoodSortBean;
import com.wangjiyuan.shiwupai.http.HttpInterfaces;
import com.wangjiyuan.shiwupai.http.HttpUtils;

import java.util.Map;

import rx.Observable;

/**
 * Created by QXL on 2016/11/30.
 */

public class FoodClassModel implements FoodClassContract.IFoodClassModel {
    @Override
    public Observable<FoodClassBean> getFoodClassObservable(Map<String, String> map) {
        HttpInterfaces httpInterfaces = HttpUtils.getInstance().getHttpInterfaces();
        Observable<FoodClassBean> foodClassObservable = httpInterfaces.getFoodClassObservable(map);
        return foodClassObservable;
    }

    @Override
    public Observable<FoodSortBean> getSortObservable(Map<String, String> map) {
        HttpInterfaces httpInterfaces = HttpUtils.getInstance().getHttpInterfaces();
        Observable<FoodSortBean> sortObservable = httpInterfaces.getSortObservable("foods", "sort_types", map);
        return sortObservable;
    }
}
